package com.shirley.pers.zhufengfmvi.entities;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Description: <br/>
 * <p/>
 * Copyright (c) , 2016, Shirley Xian <br/>
 * This program is protected by copyright laws. <br/>
 * ClassName: FocusImageList<br/>
 * Date: 2016/4/7 18:50
 *
 * @author Shirley Xian
 * @version 1.0
 */
public class FocusImageListInfo {

    /**
     * id : 3597
     * shortTitle : 中国每天2亿人乘电梯，安全吗？
     * longTitle : 中国每天2亿人乘电梯，安全吗？
     * pic : http://fdfs.xmcdn.com/group15/M06/52/77/wKgDaFW16vfD9nFSAAHBRSk6xm4459_android_large.jpg
     * type : 2
     * uid : 30495264
     * albumId : 2814299
     * isShare : false
     * is_External_url : false
     */

    private long id;
    private String shortTitle;
    private String longTitle;
    private String pic;
    private long type;
    private long uid;
    private long albumId;
    private boolean isShare;
    private boolean is_External_url;

    public void parseJson(JSONObject jsonObject) throws JSONException {
        if (jsonObject != null) {
            id = jsonObject.optLong("id");
            shortTitle = jsonObject.optString("shortTitle");
            longTitle = jsonObject.optString("longTitle");
            pic = jsonObject.optString("pic");
            type = jsonObject.optLong("type");
            uid = jsonObject.optLong("uid");
            albumId = jsonObject.optLong("albumId");
            isShare = jsonObject.optBoolean("isShare");
            is_External_url = jsonObject.optBoolean("is_External_url");
        }
    }

    public long getId() {
        return id;
    }

    public String getShortTitle() {
        return shortTitle;
    }

    public String getLongTitle() {
        return longTitle;
    }

    public String getPic() {
        return pic;
    }

    public long getType() {
        return type;
    }

    public long getUid() {
        return uid;
    }

    public long getAlbumId() {
        return albumId;
    }

    public boolean isShare() {
        return isShare;
    }

    public boolean is_External_url() {
        return is_External_url;
    }
}
